export const deepClone = (targetObj) => {
    if (typeof targetObj !== 'object') return targetObj
    let obj = Array.isArray(targetObj) ? [] : {}
    for (let key in targetObj) {
        if (targetObj[key] && targetObj.hasOwnProperty(key)) {
            if (typeof targetObj[key] === 'object') {
                obj[key] = Array.isArray(targetObj[key]) ? [] : {}
                obj[key] = deepClone(targetObj[key])
            } else {
                obj[key] = targetObj[key]
            }
        }
    }
    return obj
}